package com.test.spring.demo6;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;
import java.util.Set;

public class main {
    public static void main(String[] args) {
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml");

        test t= (test) applicationContext.getBean("test");
        List<String> list=t.getBooks();

        for (String str:list
             ) {
            System.out.println(str);
        }


        Set<String> set=t.getFood();
        for (String str1:set
             ) {
            System.out.println(str1);
        }

    }
}
